import request from '@/utils/request'

// 查询商户列表
export function listBusiness(query) {
  return request({
    url: '/system/business/list',
    method: 'get',
    params: query
  })
}

// 查询商户详细
export function getBusiness(id) {
  return request({
    url: '/system/business/' + id,
    method: 'get'
  })
}

// 新增商户
export function addBusiness(data) {
  return request({
    url: '/system/business/add',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateBusiness(data) {
  return request({
    url: '/system/business/updateBusiness',
    method: 'post',
    data: data
  })
}

// 删除商户
export function delBusiness(id) {
  return request({
    url: '/system/business/' + id,
    method: 'delete'
  })
}

// 获取短息验证码
export function getSmsCode(mobile) {
  return request({
    url: '/auth/region/phoneyzm?phone'+mobile,
    method: 'get',
  })
}

// 注册方法
export function register(data) {
  return request({
    url: '/auth/register',
    method: 'post',
    data: data
  })
  //图片
/*export function register(data) {
  return request({
    url: '/system/business/uploadImg',
    method: 'post',
    data: data
  })*/
}
